<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../js/jquery-1.11.0.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		//设置DOM透明度
		$("#b").click(function(){
			$("#p1").fadeTo("slow",0.1);//透明度取值范围是0~1
			$("#p2").fadeTo("slow",0.5);
			$("#p3").fadeTo("slow",0.8);
		});
	});
</script>
</head>
<body>
<input type="button" id="b" value="透明度"/>
<div id="p1" style="width:100px; height:100px; background-color:red; margin:10px;"></div>
<div id="p2" style="width:100px; height:100px; background-color:black; margin:10px;"></div>
<div id="p3" style="width:100px; height:100px; background-color:yellow; margin:10px;"></div>
</body>
</html>